package top.bug.blog.controller.backend;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.bug.blog.annotation.Auth;
import top.bug.blog.common.Result;
import top.bug.blog.entity.dto.sys.ServerInfoDTO;
import top.bug.blog.service.MonitorService;

import javax.annotation.Resource;

/**
 * @author <a href="https://github.com/jiusi66">九思.</a>
 * @email 10837907@qq.com
 * @from <a href="https://www.52bug.top">递归茶馆-www.52bug.top</a>
 * @description 后台-系统监控接口
 */
@Api(tags = "系统监控模块")
@RestController
@RequestMapping("/monitorApi")
@Auth
public class MonitorController {

    @Resource
    private MonitorService monitorService;

    @GetMapping("/info")
    @ApiOperation("获取所有配置")
    public Result<ServerInfoDTO> getServerInfo() {
        return Result.success(monitorService.getServerInfo()) ;
    }
}
